/* eslint-disable */
import Vue from 'vue'
import Router from 'vue-router'
import upload from '@/components/upload'

Vue.use(Router)
export default new Router({
  routes: [
    {
      path: '/',
      component: () => import('@/components/ElementUI/Main'),
      name: '导航一',
      iconCls: 'el-icon-message',//图标样式class
      children: [
        {
          path: '/biliboard',
          component: () => import('@/components/Biliboard'),
          name: '榜单',
          meta: {
            keepAlive: true // 需要缓存
          }
        },
        {
          path: '/addBoard',
          hidden:true,
          component: () => import('@/components/AddAndEditBoard'),
          name: 'addBoard'
        },
        {
          path: '/boardDetail',
          component: () => import('@/components/BoardDetail'),
          name: '榜单详情'
        },
        {
          path: '/addDetail',
          hidden:true,
          component: () => import('@/components/AddBoardDetail'),
          name: 'addDetail'
        },
        {
          path: '/merchant',
          component: () => import('@/components/Merchant/MerchantList'),
          name: '商户管理'
        },
        {
          path: '/addMerchant',
          hidden:true,
          component: () => import('@/components/Merchant/AddMerchant'),
          name: 'addMerchant'
        },
        {
          path: '/coupon',
          hidden:false,
          component: () => import('@/components/Coupon/CouponHome'),
          name: '礼包管理'
        },
        {
          path: '/addCoupon',
          hidden:true,
          component: () => import('@/components/Coupon/AddCoupon'),
          name: 'addCoupon'
          // meta: {
          //   keepAlive: true // 需要缓存
          // }
        },
        {
          path: '/addPrize',
          hidden:true,
          component: () => import('@/components/Coupon/AddPrize'),
          name: 'addPrize'
        },
        {
          path: '/checkStatic',
          component: () => import('@/components/CheckStatic'),
          name: '统计'
        },
        {
          path: '/supportRule',
          component: () => import('@/components/SupportRule'),
          name: '打榜规则'
        }
        ,{
          path:'/imgMerge',
          name:'图片合成',
          component:() => import('@/components/ImageMerge')
        },{
          path:'/uploadImg',
          name:'图片上传',
          component:() => import('@/components/UpImage')
        }

      ]
    },
    {
      path: '/',
      component: () => import('@/components/ElementUI/Main'),
      name: '导航二',
      iconCls: 'el-icon-message',//图标样式class
      hidden:true,
      children:[
        {
          path: '/home', // 主页路由
          name: '路由',
          component: () => import('@/components/Learn/Home'),
          children:[ // 嵌套子路由
            {
              path:'one', // 子页面1
              component:() => import('@/components/Learn/One')
            },
            {
              path:'two', // 子页面2
              component:() => import('@/components/Learn/Two')
            },{
              path:'one', // 子页面1
              name: 'one', // 路由名称-命名路由
              component:() => import('@/components/Learn/One')
            },{
              path:'/home/two/:id/:name', // 子页面2
              component:() => import('@/components/Learn/Two')
            },
          ]
        },
        {
          path:'/component/bindParent', // 子页面3
          name: '组件',
          component:() => import('@/components/Component/BindParent')
        },
        {
          path:'/layout', // 子页面3
          name: 'Layout',
          component:() => import('@/components/ElementUI/Layout')
        }


      ]
    },
    {
      path:'/css', // 子页面3
      name: 'css',
      hidden:true,
      component:() => import('@/components/Learn/Cs')
    },
    {
      path:'/css2', // 子页面3
      name: 'css2',
      hidden:true,
      component:() => import('@/components/Learn/Cs2')
    },
    {
      path:'/transfer', // 子页面3
      name: 'transfer',
      hidden:true,
      component:() => import('@/components/ElementUI/Transfer')
    }






  ]
})
